import request from '@/utils/request'

/**
 * 同步页面状态到生产环境
 * @param {Number} pageId - 页面ID
 * @param {Number} targetProjectId - 目标项目ID(生产环境项目ID)
 */
export function syncPageStatusToProduction(pageId, targetProjectId = 14) {
  return request({
    url: '/static_web/api/sync/page-status-to-production/',
    method: 'post',
    data: {
      page_id: pageId,
      target_project_id: targetProjectId
    }
  })
}

/**
 * 批量同步页面状态到生产环境
 * @param {Array} pageIds - 页面ID数组
 * @param {Number} targetProjectId - 目标项目ID(生产环境项目ID)
 */
export function batchSyncPageStatusToProduction(pageIds, targetProjectId = 14) {
  return request({
    url: '/static_web/api/sync/batch-page-status-to-production/',
    method: 'post',
    data: {
      page_ids: pageIds,
      target_project_id: targetProjectId
    }
  })
}
